package cn.itcast.dao;

import cn.itcast.pojo.Order;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

/**
 * Demo class
 *
 * @author gyc
 * @date 2021 /10/17
 */
public interface OrderDao {
    /**
     * Find by member id order.
     *
     * @param idCard the member id
     * @return the order
     */
    Order findByMemberId(@Param("idCard") String idCard, @Param("oDate") Date oDate);

    /**
     * mobilesave.
     *
     * @param order the order
     * @return
     */
    void mobilesave(Order order);

    /**
     * Find order by id order.
     *
     * @param id the id
     * @return the order
     */
    Order findOrderById(String id);

    /**
     * Find page page.
     *
     * @param minTime   the min time
     * @param maxTime   the max time
     * @param payStatus the pay status
     * @param orderType the order type
     * @return the page
     */
    Page<Order> findPage(@Param("minTime")String minTime, @Param("maxTime")String maxTime,
                         @Param("payStatus")Integer payStatus, @Param("orderType")String orderType,
                         @Param("queryString")String queryString);
    /**
     * Add.
     *
     * @param order the order
     */
    void add(Order order);

    /**
     * Update.
     *
     * @param order the order
     */
    void update(Order order);

    /**
     * Find by id order.
     *
     * @param id the id
     * @return the order
     */
    Order findById(String id);

    void updateStatus(Object id, Integer arrival);
}
